<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>openGauss Blog </title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    
    <link rel="shortcut icon" href="https://xzx666.gitee.io/lookeng/img/favicon.ico" type="image/x-icon" />
    <link rel="apple-touch-icon" href="https://xzx666.gitee.io/lookeng/img/apple-touch-icon.png" />

    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    
    <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/commen.css?t=1607593672000" />
    <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/blog.css?t=1607593672000" />
    <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/mobile.css?t=1607593672000" />
    <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/pagination.css?t=1607593672000">
    
    <script>
      var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?34e9f585f29581007941aa1698181871";
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
</head>
<body>
  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src='//unpkg.com/valine/dist/Valine.min.js'></script>


<div class="blog-banner">
    <h1>博客</h1>
    <img class="pc-banner" src="https://xzx666.gitee.io/lookeng/img/blog-banner-pc.png">
    <img class="h5-banner" src="https://xzx666.gitee.io/lookeng/img/blog-banner-h5.png">
</div>





<div class="container">
    <div class="columns blog-detail">
        <div class="post_detail">
            <div class="is-child box">
                <div class="breadCrumb"><a href="\zh\">博客/</a></div>
                <div class="blog-detail-header">
                    <h1></h1>
                    <div class="blog-detail-prop">
                        <img src="https://xzx666.gitee.io/lookeng/img/icon-date.png">
                        <span class="article_right_date">0001-01-01</span>
                        <img src="https://xzx666.gitee.io/lookeng/img/icon-author.png">
                        <span class="article_right_author"></span>
                        <img src="https://xzx666.gitee.io/lookeng/img/icon-view.png">
                        <span id="/zh/design/content_posts/" class="leancloud_visitors" data-flag-title="">
                            <i class="leancloud-visitors-count"></i>                     
                        </span>
                    </div>
                    <div class="blog-detail-tags">
                        <img src="https://xzx666.gitee.io/lookeng/img/icon-tag.png">
                        
                    </div>
                </div>
                <div class="content blog-content">
                    

<h1 id="posts">Posts</h1>

<p>This file is to explain in which way the content of the blogs are stored and read by the blog system.</p>

<h2 id="what-is-supported-in-the-blog">What is supported in the blog</h2>

<p>A blog can include many formats of information, like text, pictures, videos, animations or others.</p>

<p>This blog is designed to support the following formats:</p>

<ol>
<li>text</li>
<li>static picture</li>
<li>links</li>
<li>animation</li>
</ol>

<h2 id="folder-design">Folder design</h2>

<p>The content of blogs are under ./content</p>

<pre><code>|__ _example     --list the some blog examples
|__ guidance     --house the guidance to post and maintain the blogs
|__ post         --house all the final posts
   |__ author_1  --house the blogs by authors' gitee ID, and each author need create your own foler by your id.
   |__ author_2  --house the blogs by authors' gitee ID

</code></pre>

<h2 id="post-content-design">Post content design</h2>

<h3 id="file-name">File name</h3>

<p>To create a post, add a file to your _post/author<em>1/</em> directory with the following format:</p>

<pre><code>YEAR-MONTH-DAY-title.MARKUP
</code></pre>

<p>Where YEAR is a four-digit number, MONTH and DAY are both two-digit numbers, and MARKUP is the file extension representing the format used in the file. For example, the following are examples of valid post filenames:</p>

<pre><code>2020-01-01-new-years-is-coming.md
2020-02-15-how-to-write-a-blog.md
</code></pre>

<h3 id="file-headers">File headers</h3>

<p>Functionally, the post should support categories, archives, title, date, brief description, thus the file headers should be as below.</p>

<pre><code>+++
title = &quot;&quot;
date = &quot;yyyy-mm-dd&quot;
tags = [&quot;aaaa&quot;, &quot;bbbb&quot;, &quot;cccc&quot;]
archives = &quot;yyyy-mm&quot;  //by months
author = &quot;name of author&quot;
summary = &quot;&quot;
+++
</code></pre>

<h3 id="including-resources">Including resources</h3>

<p>At some point, you’ll want to include images, downloads, or other digital assets along with your text content.</p>

<p>You can put the resources in the same folder as your text file&rsquo;s, and name the resources as</p>

<pre><code>YEAR-MONTH-DAY-title-NN.MARKUP
</code></pre>

<p>Where the YEAR, MONTH, DAY, and title are the same as your blog file, and NN is the serial number of the pictures, like 01, 02 and so on. The MARKUP is the file extension, and for pictures it is recommended to use png.
The following are one example.</p>

<pre><code>2020-01-01-new-years-is-coming.md
2020-01-01-new-years-is-coming-01.png
2020-01-01-new-years-is-coming-02.gif
2020-01-01-new-years-is-coming-03.pdf
</code></pre>

<p>Then, from within any post, they can be linked to using the site’s root as the path for the asset to include. Here are some simple examples in Markdown:</p>

<p>Including an image asset in a post:</p>

<pre><code>... which is shown in the screenshot below:
![The architecture](/content/post/author1/2020-01-01-new-years-is-coming-01.png)
</code></pre>

<p>Linking to a PDF for readers to download:</p>

<pre><code>... you can [get the PDF](/content/post/yyyymm/2020-01-01-new-years-is-coming-03.pdf) directly.
</code></pre>

<p>Linking to a url for readers to visit:</p>

<pre><code>... you can [read more](&lt;https://gitee.com/opengauss/&gt;).
</code></pre>

<h2 id="thanks">Thanks</h2>

<p>The content above refered to <a href="https://jekyllrb.com/docs/posts/#the-posts-folder">https://jekyllrb.com/docs/posts/#the-posts-folder</a>.</p>

                </div>
            </div>
            <div class="box" style="margin-top:15px;">
                <div style="font-size:14px;color:gray"><strong>【免责声明】</strong>本文仅代表作者本人观点，与本网站无关。本网站对文中陈述、观点判断保持中立，不对所包含内容的准确性、可靠性或完整性提供任何明示或暗示的保证。本文仅供读者参考，由此产生的所有法律责任均由读者本人承担。</div>
            </div>
            <div class="post-comment">
                
                  
  <link rel="stylesheet" href="https://xzx666.gitee.io/lookeng/css/custom.css" />
  <div id="vcomments" lang="zh-cn" mess="说点什么吧..."></div>

  <script type="text/javascript">
    const placeholder = document.getElementById("vcomments").getAttribute("mess"),
          lang = document.getElementById("vcomments").getAttribute("lang");
    const  langs = lang == "zh-cn" ? "zh-cn" : "en";
    new Valine({
        el: '#vcomments' ,
        appId: '6wfgavgIRqmpC3hjHqQVtFWF-gzGzoHsz',
        appKey: 'QRqrBDBB0p0YhrGe9IJ169ip',
        avatar:'mm', 
        placeholder: placeholder,
        visitor: true,
		    meta: ['nick','mail','link'],
        lang: langs
    });
  </script>
            </div>
        </div>
    </div>
</div>
<script>
    $(function (){
        var query = new AV.Query('Counter');
        query.equalTo('url', decodeURIComponent('\/zh\/design\/content_posts\/'));
        query.find().then(function (data) {
            if(data.length && (data[0].attributes.author === 'openGauss')){
                var counter = AV.Object.createWithoutData('Counter', data[0].id);
                counter.set('author', '');
                counter.save();
            }
        })
    })
</script>







<input id="iframeUrl" type="text" style="display: none;" value=https://xzx666.gitee.io/>




<script defer src="https://xzx666.gitee.io/lookengjs/all.js"></script>
<script src="https://xzx666.gitee.io/lookengjs/flexible.js"></script>
<script>
  const hash = window.location.search,
        pageurl = window.location.href;
  var langss = document.querySelector("html").lang === "zh-cn" ? "zh" : "en";
  console.log("hash:",hash,"pageurl:",pageurl,"ttr",pageurl.split(langss + "/")[1])

  if(!document.getElementById("vcomments")) {
    new Valine({
        appId: '6wfgavgIRqmpC3hjHqQVtFWF-gzGzoHsz',
        appKey: 'QRqrBDBB0p0YhrGe9IJ169ip',
        avatar:'mm',
        visitor: true,
		    meta: ['nick','mail','link']
    });
  }
 
  
    


    const url = document.getElementById("iframeUrl").value;

    function observe (el, options, callback) {
      var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver
      var observer = new MutationObserver(callback)
      observer.observe(el, options)
    }

    var options = {
        childList: true,
        subtree: true,
        characterData: true
      }
    observe(document.body, options, (records, instance) => {
    const height = document.body.scrollHeight;
    parent.postMessage(height,url);
    })
    if(pageurl.split(langss + "/")[1]) parent.postMessage(pageurl.split(langss + "/")[1],url);
    

    if(document.querySelector("#notFound")) parent.postMessage("我404了",url);

</script>
</body>
</html>
